package com.example.demo.mapper;

import com.example.demo.identity.ChatFriend;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChatMapper {


    @Select("select username, gex, province, city, uu_id, TypeOfFriendShips, avatar,SignatureOfTheIndividual from common where uu_id = #{uu_id}")
    ChatFriend getUserFriendList(String uu_id);

    //    通过好友Id获取好友key、name、avatar信息
//    @Select("<script>" +
//            "SELECT uu_id, username, avatar " +  // 确保字段名正确
//            "FROM common " +
//            "WHERE uu_id IN " +
//            "<foreach item='friendId' collection='friendIds' open='(' separator=',' close=')'>" +
//            "#{friendId}" +
//            "</foreach>" +
//            "</script>")
//    List<User> getFriendUser(@Param("friendIds") List<String> friendIds);;

}
